<!--
  @author yangjiangming
  @date 2018-12-10 20:40:28
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html th:replace="~{work/modify/common/layout :: layout('改预付款', ~{::title}, ~{::content}, ~{::script})}"
      xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>工单管理-改预付款</title>
</head>
<body>

<div th:fragment="content">
    <style>
        .layui-form-item .d-width-label{
            width: 60px;
        }
        .d-width-input{
            width: 190px;
        }
        .layui-required:before {
            content: "*\00A0\00A0";
            display: inline-flex;
            color: #ff0000;
        }
    </style>
    <form action="/work/modify/save/channelprepayamount.action" class="layui-form">
        <div class="layui-form-item" th:object="${channelPrepayAmountVO}">
            <input type="hidden" id="casSign" name="casSign" th:value="${casSign}"/>
            <input type="hidden" name="orderId" th:value="*{orderId}">
            <input type="hidden" name="workId" th:value="*{workId}">

            <div class="`layui-inline`">
                <label class="layui-form-label d-width-label layui-required">实收金额</label>
                <div class="layui-inline d-width-input ">
                    <input type="text" name="channelPrepayAmount"  lay-verify="required|user-number" class="layui-input prepay" autocomplete="off" >
                </div>
            </div>
            <div class="layui-inline">
                <input type="checkbox" lay-skin="primary" name="remove"  value="2" th:if="${channelPrepayAmountVO.channelPrepayAmount}" title="删除预付款">
            </div>
        </div>

        <div id="prepayAmountList">
            <th:block th:each="item : ${channelPrepayAmountVO.channelPrepayAmountDetailList}">
                <div class="layui-form-item">
                    <label class="layui-form-label" th:text="${item.text}" />
                    <div class="layui-input-inline">
                        <input class="layui-input prepay-amount-item"
                               type="number"
                               lay-verify="channel-amount"
                               th:value="${item.value}"
                               autocomplete="off" >
                    </div>
                </div>
            </th:block>
        </div>

        <div class="layui-form-item">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">改预付款凭证<span style="color: red">*</span></label>
                    <div class="layui-upload-drag" id="channelPrepayCertificateImgSrc">
                        <input type="hidden" id="channelPrepayCertificateImgSrcValue" name="channelPrepayCertificateSrc">
                        <i class="layui-icon"></i>
                        <p>点击上传</p>
                        <img src="" th:id="|channelPrepayCertificateImgSrcValues|">
                    </div>
                    <div class="layui-inline">
                        <i class="layui-icon layui-icon-search btn-review"></i><br>
                        <i class="layui-icon layui-icon-delete btn-delete"></i>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-from-item">
            <label class="layui-form-label" style="width: 80px;">改价缘由</label>
            <div class="layui-inline" style="width: 800px;">
                <textarea name="operatorRemark" class="layui-textarea" placeholder="其他改价缘由"></textarea>
            </div>
        </div>
        <div class="layui-form-item" style="text-align: center;margin-top: 30px;">
            <div class="layui-inline">
                <input type="button" class="layui-btn layui-btn-normal" lay-submit value="保存"></input>
                <!--<button class="layui-btn layui-btn-primary" type="reset">重置</button>-->
            </div>
        </div>
    </form>
</div>

<script th:inline="javascript">
    var channelPrepayAmount = [[${channelPrepayAmountVO}]];
    var layuiModel = {
        oms_work_modify_channelprepayamount: "work/modify/zmn.oms.work.modify.channelprepayamount"
    };
</script>
</body>
</html>